#include <iostream>
#include<algorithm>
using namespace std;
int main() {
    int t;
    int v[6];
    scanf("%d", &t);
    while (t--) {
        for (int i = 0; i < 6; i++) {
            scanf("%d", &v[i]);
        }
        sort(v, v + 6);
        if (v[0] + v[1] > v[2] && v[3] + v[4] > v[5] ||
                v[0] + v[2] > v[3] && v[1] + v[4] > v[5] ||
                v[0] + v[3] > v[4] && v[1] + v[2] > v[5] ||
                v[0] + v[4] > v[5] && v[1] + v[2] > v[3])
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}
